package com.monkeyboy.spring.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @Author Gavin
 * @date 2021.06.29 11:59
 */
@Configuration
public class MyTestConfig implements InitializingBean {
	public MyTestConfig(){

	}

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("TestConfig被初始化完毕");
	}

	@Component
	class M implements InitializingBean{
		public M() {

		}

		@Override
		public void afterPropertiesSet() throws Exception {
			System.out.println("h被初始化完毕了");
		}
	}
}
